package com.google.code.bankagregator.adapter.bank.aval;

import com.google.code.bankagregator.adapter.Adapter;
import com.google.code.bankagregator.adapter.bank.aval.parsers.credits.AvalCreditParser;
import com.google.code.bankagregator.adapter.bank.aval.parsers.deposits.AvalDepositClassicParser;
import com.google.code.bankagregator.adapter.bank.aval.parsers.deposits.AvalDepositSavingParser;
import com.google.code.bankagregator.common.AbstractAdapter;
import com.google.code.bankagregator.common.reader.CreditReader;
import com.google.code.bankagregator.common.reader.DepositReader;

import java.util.ArrayList;
import java.util.List;

/**
 * Adapter for getting credits and deposits from Aval Bank
 */
public class AdapterAval extends AbstractAdapter implements Adapter {

    @Override
    public List<CreditReader> getCreditReadersList() {
        List<CreditReader> creditDataSource = new ArrayList<>();
        creditDataSource.add(new AvalCreditParser("http://www.aval.ua/ru/personal/crediting/cash/"));
        return creditDataSource;
    }

    @Override
    public List<DepositReader> getDepositReadersList() {
        List<DepositReader> depositDataSource = new ArrayList<>();
        depositDataSource.add(new AvalDepositSavingParser("http://www.aval.ua/ru/personal/accounts/vkladoschadnij/"));
        depositDataSource.add(new AvalDepositClassicParser("http://www.aval.ua/ru/personal/accounts/vkladoschadnij/"));
        return depositDataSource;
    }
}
